package com.zx.idc.backend.gui.scheduler.core;


import com.zx.idc.common.attributes.SchedulerAttributes;
import com.zx.idc.common.spring.SpringConfigUtil;
import com.zx.idc.qc.core.QuartzTaskService;
import com.zx.idc.qc.entity.TaskEntity;
import com.zx.idc.qc.exception.JobExistsException;
import com.zx.idc.qc.exception.QuartzJobException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.DependsOn;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.text.ParseException;
import java.time.Instant;

/**
 * 固定调度任务初始化类
 */
@Service
@DependsOn({"quartzTaskService", "SchedulerConfig", "springBeanUtil"})
public class FixJobsInitialization {

    private static final Logger LOG = LoggerFactory.getLogger(FixJobsInitialization.class);

    @Autowired
    private QuartzTaskService quartzTaskService;

    @PostConstruct
    public void init() {
        if (!SpringConfigUtil.getBoolean("job.schedule.enable")) {
            LOG.error("job没有启动,启动则设置job.schedule.enable为true!");
            return;
        }

        //统计报表的job
        checkAndCreate_domainArchiveReportDayJob();
        checkAndCreate_domainArchiveReportWeekJob();
        checkAndCreate_domainArchiveReportMonthJob();

        checkAndCreate_operationLogReportDayJob();
        checkAndCreate_operationLogReportWeekJob();
        checkAndCreate_operationLogReportMonthJob();

        checkAndCreate_secureLogReportDayJob();
        checkAndCreate_secureLogReportWeekJob();
        checkAndCreate_secureLogReportMonthJob();

        checkAndCreate_shieldDayReportJob();
        checkAndCreate_shieldWeekReportJob();
        checkAndCreate_shieldMonthReportJob();

        checkAndCreate_IllegalInfoDailyReportJob();
        checkAndCreate_IllegalInfoWeeklyReportJob();
        checkAndCreate_IllegalInfoMonthlyReportJob();

        checkAndCreate_IllegalMediaDailyReportJob();
        checkAndCreate_IllegalMediaWeeklyReportJob();
        checkAndCreate_IllegalMediaMonthlyReportJob();

        if (SpringConfigUtil.getBoolean("job.schedule.auto-upload-enable")) {

            checkAndCreate_activeResourceReportJob();
            checkAndCreate_illegalWebReportJob();
            /**
             * 活跃状态上报
             */
            checkAndCreate_activeStateReportJob();

            checkAndCreate_filterLogReportJob();
            checkAndCreate_monitorLogReportJob();

            /**
             * region 基础上报调度任务初始化（默认全量上报好了）
             */
            checkAndCreate_BaseDataJobEntire();
            checkAndCreate_BaseMonitorDataJobEntire();
            LOG.info("自动上报JOB 启动完成!");
        }

        checkAndCreate_monitorAndFilterCleanCacheJob();
        checkAndCreate_createIndexCollectionOfAccessLogJob();

        // endregion

        checkAndCreate_MoIllegalInfoJobEntire();
        checkAndCreate_NetCommunicationJobEntire();
        checkAndCreate_AccessLogJobEntire();
        checkAndCreate_FilterLogJobEntire();
        checkAndCreate_HotLogJobEntire();
        checkAndCreate_MonitorLogJobEntire();


    }

    /**
     * 创建具有索引的访问日志集合job(创建明天的)
     */
    private void checkAndCreate_createIndexCollectionOfAccessLogJob() {

        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.ins.accesslog.CreateIndexCollectionOfAccessLogJob");
        taskEntity.setCronExpression(SpringConfigUtil.get(SchedulerAttributes.ACCESS_LOG_CREATE_COLLECTION_CRON));
        taskEntity.setJobGroup("insCreateCollection");
        taskEntity.setJobName("accessLogCreateCollectJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("创建访问日志Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("创建访问日志Job失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("创建访问日志Job启动完成");

    }

    /**
     * 定时清除过滤/监测指令缓存任务
     */
    private void checkAndCreate_monitorAndFilterCleanCacheJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.ins.filtermonitorlog.job.InsCleanCacheJob");
        taskEntity.setCronExpression(SpringConfigUtil.get(SchedulerAttributes.INS_CLEAN_CACHE_CRON));
        taskEntity.setJobGroup("insCleanCache");
        taskEntity.setJobName("insCleanCacheJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("过滤/监测指令缓存定时清除Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("过滤/监测指令缓存定时清除Job失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("过滤/监测指令缓存定时清除Job启动完成");
    }

    // region 监管日志

    /**
     * 过滤日志定时上报 每20分钟上报一次
     */
    private void checkAndCreate_filterLogReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.api.management.scheduler.job.ReportFilterLogDataJob");
        taskEntity.setCronExpression(SpringConfigUtil.get(SchedulerAttributes.FILTER_REPORT_CRON));
        taskEntity.setJobGroup("filterLogReport");
        taskEntity.setJobName("filterLogReportJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("过滤日志定时上报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("过滤日志定时上报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("过滤日志定时上报Job启动完成");
    }

    /**
     * 监测日志定时上报 每20分钟上报一次
     */
    private void checkAndCreate_monitorLogReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.api.management.scheduler.job.ReportMonitorLogDataJob");
        taskEntity.setCronExpression(SpringConfigUtil.get(SchedulerAttributes.MONITOR_REPORT_CRON));
        taskEntity.setJobGroup("monitorLogReport");
        taskEntity.setJobName("monitorLogReportJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("监测日志定时上报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("监测日志定时上报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("监测日志定时上报Job启动完成");
    }

    /**
     * 活跃状态定时上报 每10分钟上报一次
     */
    private void checkAndCreate_activeStateReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.api.management.scheduler.job.ReportActiveStateWebJob");
        taskEntity.setCronExpression(SpringConfigUtil.get(SchedulerAttributes.ACTIVE_STATE_REPORT_CRON));
        taskEntity.setJobGroup("activeStateReport");
        taskEntity.setJobName("activeStateReportJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("活动状态定时上报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("活动状态定时上报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("活动状态定时上报Job启动成功");
    }

    /**
     * 活跃资源监测数据主动上报，上报前一天的数据 上报数据：活跃域名 活跃IP
     */
    private void checkAndCreate_activeResourceReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.api.management.scheduler.job.ReportActiveResourceJob");
        taskEntity.setCronExpression(SpringConfigUtil.get(SchedulerAttributes.ACTIVE_RESOURCE_REPORT_CRON));
        taskEntity.setJobGroup("activeResourceReport");
        taskEntity.setJobName("activeResourceReportJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("活跃资源定时上报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("活跃资源定时上报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("活跃资源定时上报Job启动成功");
    }

    /**
     * 违法违规网站监测数据主动上报，上报前一天的数据
     */
    private void checkAndCreate_illegalWebReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.api.management.scheduler.job.ReportIllegalWebJob");
        taskEntity.setCronExpression(SpringConfigUtil.get(SchedulerAttributes.ILLEGAL_WEB_REPORT_CRON));
        taskEntity.setJobGroup("illegalWebReport");
        taskEntity.setJobName("illegalWebReportJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("违法违规网站监测数据定时上报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("违法违规网站监测数据定时上报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("违法违规网站监测数据定时上报Job启动成功");
    }

    // endregion

    // region 创建域名备案统计报表job

    /**
     * 创建域名备案统计报表job -- 日报
     */
    private void checkAndCreate_domainArchiveReportDayJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.domain.RDomainArchiveDayJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.domainArchive.day"));
        taskEntity.setJobGroup("domainReport");
        taskEntity.setJobName("domainArchiveDayJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("域名备案日报统计Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("域名备案日报统计Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("域名备案日报统计Job启动成功");
    }

    /**
     * 创建域名备案统计报表job -- 周报
     */
    private void checkAndCreate_domainArchiveReportWeekJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.domain.RDomainArchiveWeekJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.domainArchive.week"));
        taskEntity.setJobGroup("domainReport");
        taskEntity.setJobName("domainArchiveWeekJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("域名备案周报统计Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("域名备案周报统计Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("域名备案周报统计Job启动成功");
    }

    /**
     * 创建域名备案统计报表job -- 月报
     */
    private void checkAndCreate_domainArchiveReportMonthJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.domain.RDomainArchiveMonJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.domainArchive.month"));
        taskEntity.setJobGroup("domainReport");
        taskEntity.setJobName("domainArchiveMonJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("域名备案月报统计Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("域名备案月报统计Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("域名备案月报统计Job启动成功");
    }

    // endregion

    // region 创建操作日志统计报表job

    /**
     * 创建操作日志统计报表job -- 日报
     */
    private void checkAndCreate_operationLogReportDayJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.operationlog.ROperationLogDayJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.operationlog.day"));
        taskEntity.setJobGroup("operationLogReport");
        taskEntity.setJobName("operationLogDayJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("操作日志报表日报统计Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("操作日志报表日报统计Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("操作日志报表日报统计Job启动成功");
    }


    /**
     * 创建操作日志统计报表job -- 周报
     */
    private void checkAndCreate_operationLogReportWeekJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.operationlog.ROperationLogWeekJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.operationlog.week"));
        taskEntity.setJobGroup("operationLogReport");
        taskEntity.setJobName("operationLogWeekJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("操作日志报表周报统计Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("操作日志报表周报统计Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("操作日志报表周报统计Job启动成功");
    }

    /**
     * 创建操作日志统计报表job -- 月报
     */
    private void checkAndCreate_operationLogReportMonthJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.operationlog.ROperationLogMonJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.operationlog.month"));
        taskEntity.setJobGroup("operationLogReport");
        taskEntity.setJobName("operationLogMonJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("操作日志报表月报统计Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("操作日志报表月报统计Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("操作日志报表月报统计Job启动成功");
    }

    // endregion

    // region 创建安全日志统计报表job

    /**
     * 创建安全日志统计报表job -- 日报
     */
    private void checkAndCreate_secureLogReportDayJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.securelog.RSecureLogDayJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.securelog.day"));
        taskEntity.setJobGroup("secureLogReport");
        taskEntity.setJobName("secureLogDayJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("安全日志报表日报统计Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("安全日志报表日报统计Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("安全日志报表日报统计Job启动成功");
    }

    /**
     * 创建安全日志统计报表job -- 周报
     */
    private void checkAndCreate_secureLogReportWeekJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.securelog.RSecureLogWeekJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.securelog.week"));
        taskEntity.setJobGroup("secureLogReport");
        taskEntity.setJobName("secureLogWeekJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("安全日志报表周报统计Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("安全日志报表周报统计Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("安全日志报表周报统计Job启动成功");

    }


    /**
     * 创建安全日志统计报表job -- 月报
     */
    private void checkAndCreate_secureLogReportMonthJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.securelog.RSecureLogMonJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.securelog.month"));
        taskEntity.setJobGroup("secureLogReport");
        taskEntity.setJobName("secureLogMonJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("安全日志报表月报统计Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("安全日志报表月报统计Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("安全日志报表月报统计Job启动成功");
    }

    // endregion

    // region 创建屏蔽统计job

    /**
     * 创建屏蔽统计job -- 日报
     */
    private void checkAndCreate_shieldDayReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.shield.RShieldDayJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.shield.day"));
        taskEntity.setJobGroup("shieldReport");
        taskEntity.setJobName("rShieldDayJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("屏蔽统计日报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("屏蔽统计日报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("屏蔽统计日报Job启动成功");
    }

    /**
     * 创建屏蔽统计job -- 周报
     */
    private void checkAndCreate_shieldWeekReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.shield.RShieldWeekJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.shield.week"));
        taskEntity.setJobGroup("shieldReport");
        taskEntity.setJobName("rShieldWeekJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("屏蔽统计周报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("屏蔽统计周报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("屏蔽统计周报Job启动成功");
    }


    /**
     * 创建屏蔽统计job  -- 月报
     */
    private void checkAndCreate_shieldMonthReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.shield.RShieldMonJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.shield.month"));
        taskEntity.setJobGroup("shieldReport");
        taskEntity.setJobName("rShieldMonJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("屏蔽统计月报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("屏蔽统计月报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("屏蔽统计月报Job启动成功");
    }

    // endregion

    // region 创建非法信息统计报表

    /**
     * 创建非法信息统计报表--日报Job
     */
    private void checkAndCreate_IllegalInfoDailyReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.illegalinfo.RIllegalInfoDayJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.illegalinfo.day"));
        taskEntity.setJobGroup("illegalInfoReport");
        taskEntity.setJobName("rIllegalInfoDayJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("非法信息统计日报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("非法信息统计日报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("非法信息统计日报Job启动成功");
    }

    /**
     * 创建非法信息统计报表--周报Job
     */
    private void checkAndCreate_IllegalInfoWeeklyReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.illegalinfo.RIllegalInfoWeekJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.illegalinfo.week"));
        taskEntity.setJobGroup("illegalInfoReport");
        taskEntity.setJobName("rIllegalInfoWeekJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("非法信息统计周报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("非法信息统计周报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("非法信息统计周报Job启动成功");
    }


    /**
     * 创建非法信息统计报表--月报Job
     */
    private void checkAndCreate_IllegalInfoMonthlyReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.illegalinfo.RIllegalInfoMonJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.illegalinfo.month"));
        taskEntity.setJobGroup("illegalInfoReport");
        taskEntity.setJobName("rIllegalInfoMonJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("非法信息统计月报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("非法信息统计月报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("非法信息统计月报Job启动成功");
    }

    // endregion

    // region 创建非法多媒体统计报表

    /**
     * 创建非法多媒体统计报表--日报Job
     */
    private void checkAndCreate_IllegalMediaDailyReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.illegalmedia.RIllegalMediaDayJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.illegalmedia.day"));
        taskEntity.setJobGroup("illegalMediaReport");
        taskEntity.setJobName("rIllegalMediaDayJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("非法多媒体统计日报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("非法多媒体统计日报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("非法多媒体统计日报Job启动成功");
    }


    /**
     * 创建非法多媒体统计报表--周报Job
     */
    private void checkAndCreate_IllegalMediaWeeklyReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.illegalmedia.RIllegalMediaWeekJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.illegalmedia.week"));
        taskEntity.setJobGroup("illegalMediaReport");
        taskEntity.setJobName("rIllegalMediaWeekJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("非法多媒体统计周报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("非法多媒体统计周报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("非法多媒体统计周报Job启动成功");
    }


    /**
     * 创建非法多媒体统计报表--月报Job
     */
    private void checkAndCreate_IllegalMediaMonthlyReportJob() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.report.illegalmedia.RIllegalMediaMonJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.illegalmedia.month"));
        taskEntity.setJobGroup("illegalMediaReport");
        taskEntity.setJobName("rIllegalMediaMonJob");
        taskEntity.setStartTime(System.currentTimeMillis());
        taskEntity.setJobDescription("非法多媒体统计月报Job");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("非法多媒体统计月报Job创建失败", e);
        } catch (JobExistsException e) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("非法多媒体统计月报Job启动成功");
    }

    // endregion

    // region 基础数据 => 客户信息

    /**
     * [基础数据 => 客户信息 => 新增] 上报任务
     */
    private void checkAndCreate_BaseCustomerJobAdd() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.cus.BaseCustomerJobAdd");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.add"));
        taskEntity.setJobGroup("baseCustomerJob");
        taskEntity.setJobName("baseCustomerJobAdd");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => 客户信息 => 新增] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => 客户信息 => 新增] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[基础数据 => 客户信息 => 新增] 上报任务Job启动完成");
    }

    /**
     * [基础数据 => 客户信息 => 新增] 上报任务
     */
    private void checkAndCreate_BaseCustomerJobUpdate() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.cus.BaseCustomerJobUpdate");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.update"));
        taskEntity.setJobGroup("baseCustomerJob");
        taskEntity.setJobName("baseCustomerJobUpdate");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => 客户信息 => 修改] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => 客户信息 => 修改] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[基础数据 => 客户信息 => 修改] 上报任务Job启动完成");
    }

    /**
     * [基础数据 => 客户信息 => 删除] 上报任务
     */
    private void checkAndCreate_BaseCustomerJobDelete() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.cus.BaseCustomerJobDelete");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.delete"));
        taskEntity.setJobGroup("baseCustomerJob");
        taskEntity.setJobName("baseCustomerJobDelete");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => 客户信息 => 删除] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => 客户信息 => 删除] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[基础数据 => 客户信息 => 删除] 上报任务Job启动完成");
    }

    // endregion

    // region 基础数据 => 机房信息

    /**
     * [基础数据 => 机房信息 => 新增] 上报任务
     */
    private void checkAndCreate_BaseHouseInfoJobAdd() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.house.BaseHouseInfoJobAdd");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.add"));
        taskEntity.setJobGroup("baseHouseInfoJob");
        taskEntity.setJobName("baseHouseInfoJobAdd");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => 机房信息 => 新增] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => 机房信息 => 新增] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[基础数据 => 机房信息 => 新增] 上报任务Job启动完成");
    }

    /**
     * [基础数据 => 机房信息 => 修改] 上报任务
     */
    private void checkAndCreate_BaseHouseInfoJobUpdate() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.house.BaseHouseInfoJobUpdate");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.update"));
        taskEntity.setJobGroup("baseHouseInfoJob");
        taskEntity.setJobName("baseHouseInfoJobUpdate");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => 机房信息 => 修改] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => 机房信息 => 修改] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[基础数据 => 机房信息 => 修改] 上报任务Job启动完成");
    }

    /**
     * [基础数据 => 机房信息 => 删除] 上报任务
     */
    private void checkAndCreate_BaseHouseInfoJobDelete() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.house.BaseHouseInfoJobDelete");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.delete"));
        taskEntity.setJobGroup("baseHouseInfoJob");
        taskEntity.setJobName("baseHouseInfoJobDelete");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => 机房信息 => 删除] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => 机房信息 => 删除] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[基础数据 => 机房信息 => 删除] 上报任务Job启动完成");
    }

    // endregion

    // region 基础数据 => IP 地址

    /**
     * [基础数据 => IP 地址 => 新增] 上报任务
     */
    private void checkAndCreate_BaseIpAddressInfoJobAdd() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.ip.BaseIpAddressInfoJobAdd");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.add"));
        taskEntity.setJobGroup("baseIpAddressInfoJob");
        taskEntity.setJobName("baseIpAddressInfoJobAdd");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => IP 地址 => 新增] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => IP 地址 => 新增] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
    }

    /**
     * [基础数据 => IP 地址 => 修改] 上报任务
     */
    private void checkAndCreate_BaseIpAddressInfoJobUpdate() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.ip.BaseIpAddressInfoJobUpdate");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.update"));
        taskEntity.setJobGroup("baseIpAddressInfoJob");
        taskEntity.setJobName("baseIpAddressInfoJobUpdate");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => IP 地址 => 修改] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => IP 地址 => 修改] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
    }

    /**
     * [基础数据 => IP 地址 => 删除] 上报任务
     */
    private void checkAndCreate_BaseIpAddressInfoJobDelete() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.ip.BaseIpAddressInfoJobDelete");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.delete"));
        taskEntity.setJobGroup("baseIpAddressInfoJob");
        taskEntity.setJobName("baseIpAddressInfoJobDelete");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => IP 地址 => 删除] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => IP 地址 => 删除] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
    }

    // endregion

    // region 基础数据 => 经营单位

    /**
     * [基础数据 => 经营单位 => 新增] 上报任务
     */
    private void checkAndCreate_BaseOperCompanyJobAdd() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.oper.BaseIpAddressInfoJobAdd");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.add"));
        taskEntity.setJobGroup("baseOperCompanyJob");
        taskEntity.setJobName("baseOperCompanyJobAdd");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => 经营单位 => 新增] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => 经营单位 => 新增] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
    }

    /**
     * [基础数据 => 经营单位 => 修改] 上报任务
     */
    private void checkAndCreate_BaseOperCompanyJobUpdate() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.oper.BaseOperCompanyJobUpdate");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.update"));
        taskEntity.setJobGroup("baseOperCompanyJob");
        taskEntity.setJobName("baseOperCompanyJobUpdate");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => 经营单位 => 修改] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => 经营单位 => 修改] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
    }

    /**
     * [基础数据 => 经营单位 => 删除] 上报任务
     */
    private void checkAndCreate_BaseOperCompanyJobDelete() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.oper.BaseOperCompanyJobDelete");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-immediate-job.delete"));
        taskEntity.setJobGroup("baseOperCompanyJob");
        taskEntity.setJobName("baseOperCompanyJobDelete");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据 => 经营单位 => 删除] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据 => 经营单位 => 删除] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
    }

    // endregion

    // region 基础数据全部上报

    /**
     * [基础数据整体] 上报任务(目前只需要删除上报）
     */
    private void checkAndCreate_BaseDataJobEntire() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.entire.BaseDataJobEntire");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-entire-job.basic"));
        taskEntity.setJobGroup("baseDataJob");
        taskEntity.setJobName("baseDataJobEntire");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础数据整体] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础数据整体] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[基础数据整体] 上报任务Job启动成功");
    }

    /**
     * [基础监测数据] 上报任务
     */
    private void checkAndCreate_BaseMonitorDataJobEntire() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.base.entire.BaseMonitorDataJobEntire");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.base-data-entire-job.monitor"));
        taskEntity.setJobGroup("baseMonitorDataJob");
        taskEntity.setJobName("baseMonitorDataJobEntire");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("[基础监测数据] 上报任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[基础监测数据] 上报任务创建失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[基础监测数据] 上报任务Job启动成功");
    }

    // endregion
    /**
     * [非法信息]清理任务
     */
    private void checkAndCreate_MoIllegalInfoJobEntire() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.mo.moIllegalInfo.MoIllegalInfoScheduledJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.client-slog-job.moIllegal-info-scheduled"));
        taskEntity.setJobGroup("moIllegalInfoScheduledJob");
        taskEntity.setJobName("moIllegalInfoScheduledJobEntire");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("非法信息清理任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[非法信息]清理任务执行失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[非法信息] 清理任务Job启动成功");
    }

    /**
     * [通讯文件]清理任务
     */
    private void checkAndCreate_NetCommunicationJobEntire() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.net.netcommunication.NetCommunicationScheduledJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.client-slog-job.net-communication-scheduled"));
        taskEntity.setJobGroup("netCommunicationScheduledJob");
        taskEntity.setJobName("netCommunicationScheduledJobEntire");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("通讯文件清理任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[通讯文件]清理任务执行失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[通讯文件] 清理任务Job启动成功");
    }

    /**
     * [访问日志]清理任务
     */
    private void checkAndCreate_AccessLogJobEntire() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.slog.accesslog.AccessLogScheduledJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.client-slog-job.access-log-scheduled"));
        taskEntity.setJobGroup("accessLogScheduledJob");
        taskEntity.setJobName("accessLogScheduledJobEntire");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("访问日志清理任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[访问日志]清理任务执行失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[访问日志] 清理任务Job启动成功");
    }

    /**
     * [过滤日志]清理任务
     */
    private void checkAndCreate_FilterLogJobEntire() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.slog.filterLog.FilterLogScheduledJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.client-slog-job.filter-log-scheduled"));
        taskEntity.setJobGroup("filterLogScheduledJob");
        taskEntity.setJobName("filterLogScheduledJobEntire");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("过滤日志日志清理任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[过滤日志]清理任务执行失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[过滤日志] 清理任务Job启动成功");
    }


    /**
     * [活跃日志]清理任务
     */
    private void checkAndCreate_HotLogJobEntire() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.slog.hotdomain.SlogHotDomainScheduledJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.client-slog-job.hot-domain-scheduled"));
        taskEntity.setJobGroup("hotLogScheduledJob");
        taskEntity.setJobName("hotLogScheduledJobEntire");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("活跃日志清理任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[活跃日志]清理任务执行失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[活跃日志] 清理任务Job启动成功");
    }



    /**
     * [监控日志]清理任务
     */
    private void checkAndCreate_MonitorLogJobEntire() {
        TaskEntity taskEntity = new TaskEntity();
        taskEntity.setJobClass("com.zx.idc.backend.gui.scheduler.slog.monitorlog.MonitorLogScheduledJob");
        taskEntity.setCronExpression(SpringConfigUtil.get("job.cron.report.client-slog-job.monitor-log-scheduled"));
        taskEntity.setJobGroup("monitorLogScheduledJob");
        taskEntity.setJobName("monitorLogScheduledJobEntire");
        taskEntity.setStartTime(Instant.now().toEpochMilli());
        taskEntity.setJobDescription("监控日志清理任务");
        try {
            quartzTaskService.addCronTask(taskEntity);
        } catch (QuartzJobException e) {
            LOG.error("[监控日志]清理任务执行失败", e);
        } catch (JobExistsException ignored) {
        } catch (ParseException e) {
            LOG.error("cron表达式格式错误", e);
        }
        LOG.info("[监控日志] 清理任务Job启动成功");
    }

}
